package com.ilancuo.reflect;

public class Test {
    public static void main(String[] args) {
//        testForName();
//        testClass();
        testStringClass();
    }

    private static void testStringClass() {
        Class stringClass = "hello".getClass();
        System.out.println(stringClass);
    }

    private static void testClass() {
        Class stringClass = String.class;
        System.out.println(stringClass);
    }

    private static void testForName() {
        try {
            Class stringClass = Class.forName("java.lang.String");
            System.out.println(stringClass);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
    }
}
